package com.ebook.ui.fragment.home.everyrecommend;

import javax.swing.*;
import java.awt.*;

/**需要处理文本显示细节**/
public class BookLabel extends JComponent {
    private String text;
    public BookLabel(String text){
        super();
        this.text = text;
        this.setLocation(17,150);
        this.setSize(120,40);
    }
    @Override
    public void paintComponent(Graphics g){
        super.paintComponent(g);
        g.drawString(text,10,20);
    }
}
